package com.cari.oa.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cari.oa.dao.BaseDao;
import com.cari.oa.dao.SoftBugCommentDao;
import com.cari.oa.domain.SoftBugCommentEntity;
import com.cari.oa.util.StrUtils;

@Service
@Transactional(rollbackFor = Exception.class)
public class SoftBugCommentService extends BaseService<SoftBugCommentEntity> {
	
	@Resource
	private SoftBugCommentDao softBugCommentDao;

	@Override
	public BaseDao<SoftBugCommentEntity> getDao() {
		return softBugCommentDao;
	}
	/**
	* Title: getCommentByBugId
	* Description:根据BugId获取评论
	* @author    hjx 
	* @date      2013-2-16 
	* @param bugId
	* @return
	*/
	public List<SoftBugCommentEntity> getCommentByBugId(String bugId)
    {
		if(StrUtils.isEmpty(bugId))
		{
			new RuntimeException("bugId不能为空！");
		}
		return softBugCommentDao.getCommentByBugId(bugId);
    }	
}
